﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IPC.Communication.Framework.Profinet.AllenBradley
{
    public class AbTagItem
    {
        private ushort symbolType = 0;

        public uint InstanceID
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public ushort SymbolType
        {
            get
            {
                return this.symbolType;
            }
            set
            {
                this.symbolType = value;
                this.ArrayDimension = (((this.symbolType & 16384) == 16384) ? 2 : (((this.symbolType & 8192) == 8192) ? 1 : 0));
                this.IsStruct = ((this.symbolType & 32768) == 32768);
            }
        }

        public int ArrayDimension
        {
            get;
            set;
        }

        public bool IsStruct
        {
            get;
            set;
        }
    }
}
